/* eslint-disable no-unused-vars */
import React, { useEffect } from "react";
import styles from './submitbutton.module.css'


/** 提交按钮 */
const SubmitButton = ({ label, danger, disabled, onClick, ...props }) => {
    const handleClick = (e) => {
        if (disabled) {
            return;
        }
        onClick?.(e);
    };

    return (
        <div 
            className={`${styles.submitButtonRoot} ${danger ? styles.submitButtonRootDanger : ''} ${disabled ? styles.submitButtonRootDisabled : ''}`}
            onClick={handleClick}
            {...props}
        >
            {label}
        </div>
    );
};

export default SubmitButton;